package demoafternoon;

import java.util.ArrayList;
import java.util.Random;

public class Member extends Manager {
    private String username;
    private int money;



    public Member(String username, int money) {
    	super(username, money); // Assuming Manager class has a default constructor or one with parameters
        this.username = username;
        this.money = money;
    }

    public void receive(ArrayList<Integer> redList) {
        int index = new Random().nextInt(redList.size());
        Integer delta = redList.remove(index);
        int money = super.getMoney() + delta;
        super.setMoney(money);
    }

}